﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Golf.WebUI.Customers
{
    public partial class OrderHistory : System.Web.UI.Page
    {
        /// <summary>
        /// 登录用户的id
        /// </summary>
        public int userid;

        /// <summary>
        /// 获取主机名称
        /// </summary>
        public string http_Host = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            http_Host = ThumNail.GetHttpHost();
            Object obj = CookiesHelper.GetCookie("_Customer_id");
            if (obj == null || obj.ToString() == "")
            {

            }
            else
            {
                userid = int.Parse(obj.ToString());
            }
            if (!IsPostBack)
            {
                DateBindOrder(userid);
            }
        }


        Golf.BLL.Golf_Order orderBll = new BLL.Golf_Order();
        Golf.Model.Golf_Order order = new Model.Golf_Order();
        /// <summary>
        /// 绑定订单用户所有列表
        /// </summary>
        public void DateBindOrder(int id)
        {
            Repeater1.DataSource = orderBll.GetList(" userid=" + id);
            Repeater1.DataBind();
        }
    }
}
